<template>
    <x-form v-if="article.id" :news="article" />
</template>

<script setup>
import axios from '@/plugins/axios'
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import XForm from './Form.vue'

const route = useRoute()
const article = ref({})
axios.get(`news/${route.query.id}`).then(_ => (article.value = _))
</script>

<style></style>
